-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faker::Games::Dota
missing quotes and new heroes
#2907
Faker::Games::Dota
missing quotes and new heroes
#2907
Conversation
Bane - https://dota2.fandom.com/wiki/Bane/Responses Batrider - https://dota2.fandom.com/wiki/Batrider/Responses Bloodseeker - https://dota2.fandom.com/wiki/Bloodseeker/Responses Bounty Hunter - https://dota2.fandom.com/wiki/Bounty_Hunter/Responses Broodmother - https://dota2.fandom.com/wiki/Broodmother/Responses
The hero is called `Centaur Warrunner` but in `quotes` he's called just `centaur`. It causes problems if users try to generate quote by `parameterize(separator: '_')` the name. I left old `centaur` to not brake people's code.
Dark Seer - https://dota2.fandom.com/wiki/Dark_Seer/Responses Dark Willow - https://dota2.fandom.com/wiki/Dark_Willow/Responses Dawnbreaker - https://dota2.fandom.com/wiki/Dawnbreaker/Responses Dazzle - https://dota2.fandom.com/wiki/Dazzle/Responses Death Prophet - https://dota2.fandom.com/wiki/Death_Prophet/Responses Disruptor - https://dota2.fandom.com/wiki/Disruptor/Responses Drow Ranger - https://dota2.fandom.com/wiki/Drow_Ranger/Responses
Thank you! What if we fixed this by making sure that if a hero does not have a quote, we return nil instead of an error? Additionally, we could remove the default hero as well. Or we can also remove the dependency between hero and quote. What do you think? |
Thanks for checking my PR!
Yes, I can implement that. But I still want to populate quotes for every hero. So I think it's unnecessary to remove dependency between heroes and quotes.
After populating all quotes, yeah. And also replace this variable with @heroes = Faker::Base.fetch_all('games.dota.hero').map { |hero| hero.gsub(/\W+/, '_').downcase } What's the best way for me to proceed with this PR? I don't want to spam contributors notifications, putting more commits in this PR will do exactly that. My suggestion is
|
HI @arthurka-o thank you for you comment! Catching up with the reviews now.
It doesn't spam us when you push commits to a open PR 👍
Are there still more things to add besides the ones being added here? I'd rather remove the heroes that don't have the quotes for now; we also don't want to add every single hero and subsequent quote -- that's too much. We'll probably organize things around and adding more stuff means more things to shuffle later. This one looks good to me and it can also handle the case when the |
hi @arthurka-o just checking in: are you still interested in working on this? I understand you want to populate quotes for every hero but that's a lot for us maintain. We'd rather remove the heroes that don't have the quotes. Thanks! |
hi @stefannibrasil. Sorry, completely forgot about this PR 😅 |
@stefannibrasil now thinking more about this, it's a bad idea to remove heroes that don't have quotes. I'm sure most users don't even use quotes from heroes, and having a full list of heroes is more important. I want to return an empty string if a hero doesn't have quotes. WDYT?
but then this test won't work. What should we do it with it then? |
Could you share more how you got to this conclusion?
I understand, however there are more than 100 characters and we don't need to include all of them, just a sample (around 15 to 20). We don't need to update the generator to go down to 15 or 20, but we can remove the ones that don't have quotes.
Yeah, that's a valid concern. I understand I was the one who suggested returning nil but thinking more about this, from a user's perspective, if I pass a hero that doesn't have a quote, it would be expected to have an error with instructions on how to generate one, so an empty string wouldn't give any feedback on how to fix the error. However, it's a bit weird that the user needs to know which characters have quotes, so not ideal. That's where I was coming from about removing the characters that don't have quotes. That's a breaking change that we can highlight in the release notes while not adding more stuff. That way we guarantee the characters we have are compatible with the other generators in Faker::Games::Dota. |
From my perspective, as a Dota 2 player and developer, I would assume that if a library can generate Hero names, all heroes would be present. But in the other hand, Faker is not a DB for games, it doesn't have to include all heroes. It's here to generate fake data. In the end, I think it's fair to remove heroes that don't have quotes. |
And I also added `meepo` to the test because he was missing
@stefannibrasil should be good to review 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @arthurka-o 🎲
Motivation / Background
This Pull Request has been created because I was trying to generate a quote from random Dota 2 heroes.
And encountered that a lot of heroes don't have any quotes for them. That's why I decided to fill missing quotes.
For this PR I only added missing quotes for heroes from A to D. I'm not sure that Faker team will accept those changes, so I decided to stop on this for now. I'll do other heroes quotes after seeing the green light.
And also I added two missing heroes. This is a small change so I decided to put it in this PR.
Additional information
I also added
centaur_warrunner
quotes by copingcentaur
quotes. My reasoning is in the commit message.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
If you're proposing a new generator or locale: